home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / cvs-960311 / info / cvsclient.info < prev    next >
Encoding:
GNU Info File  |  1996-01-22  |  27.3 KB  |  664 lines

  1. This is Info file cvsclient.info, produced by Makeinfo-1.64 from the
  2. input file ./cvsclient.texi.
  3.  
  4. 
  5. File: cvsclient.info,  Node: Top,  Next: Goals,  Up: (dir)
  6.  
  7. CVS Client/Server
  8. *****************
  9.  
  10.    This manual describes the client/server protocol used by CVS.  It
  11. does not describe how to use or administer client/server CVS; see the
  12. regular CVS manual for that.
  13.  
  14. * Menu:
  15.  
  16. * Goals::             Basic design decisions, requirements, scope, etc.
  17. * Notes::             Notes on the current implementation
  18. * Protocol Notes::    Possible enhancements, limitations, etc. of the protocol
  19. * Protocol::          Complete description of the protocol
  20.  
  21. 
  22. File: cvsclient.info,  Node: Goals,  Next: Notes,  Prev: Top,  Up: Top
  23.  
  24. Goals
  25. *****
  26.  
  27.    * Do not assume any access to the repository other than via this
  28.      protocol.  It does not depend on NFS, rdist, etc.
  29.  
  30.    * Providing a reliable transport is outside this protocol.  It is
  31.      expected that it runs over TCP, UUCP, etc.
  32.  
  33.    * Security and authentication are handled outside this protocol (but
  34.      see below about `cvs kserver').
  35.  
  36.    * This might be a first step towards adding transactions to CVS
  37.      (i.e. a set of operations is either executed atomically or none of
  38.      them is executed), improving the locking, or other features.  The
  39.      current server implementation is a long way from being able to do
  40.      any of these things.  The protocol, however, is not known to
  41.      contain any defects which would preclude them.
  42.  
  43.    * The server never has to have any CVS locks in place while it is
  44.      waiting for communication with the client.  This makes things
  45.      robust in the face of flaky networks.
  46.  
  47.    * Data is transferred in large chunks, which is necessary for good
  48.      performance.  In fact, currently the client uploads all the data
  49.      (without waiting for server responses), and then waits for one
  50.      server response (which consists of a massive download of all the
  51.      data).  There may be cases in which it is better to have a richer
  52.      interraction, but the need for the server to release all locks
  53.      whenever it waits for the client makes it complicated.
  54.  
  55. 
  56. File: cvsclient.info,  Node: Notes,  Next: Protocol Notes,  Prev: Goals,  Up: Top
  57.  
  58. Notes on the Current Implementation
  59. ***********************************
  60.  
  61.    The client is built in to the normal `cvs' program, triggered by a
  62. `CVSROOT' variable containing a colon, for example
  63. `cygnus.com:/rel/cvsfiles'.
  64.  
  65.    The client stores what is stored in checked-out directories
  66. (including `CVS').  The way these are stored is totally compatible with
  67. standard CVS.  The server requires no storage other than the repository,
  68. which also is totally compatible with standard CVS.
  69.  
  70.    The server is started by `cvs server'.  There is no particularly
  71. compelling reason for this rather than making it a separate program
  72. which shares a lot of sources with cvs.
  73.  
  74.    The server can also be started by `cvs kserver', in which case it
  75. does an initial Kerberos authentication on stdin.  If the authentication
  76. succeeds, it subsequently runs identically to `cvs server'.
  77.  
  78.    The current server implementation can use up huge amounts of memory
  79. when transmitting a lot of data over a slow link (i.e. the network is
  80. slower than the server can generate the data).  There is some
  81. experimental code (see `SERVER_FLOWCONTROL' in options.h) which should
  82. help significantly.
  83.  
  84. 
  85. File: cvsclient.info,  Node: Protocol Notes,  Next: Protocol,  Prev: Notes,  Up: Top
  86.  
  87. Notes on the Protocol
  88. *********************
  89.  
  90.    A number of enhancements are possible:
  91.  
  92.    * The `Modified' request could be speeded up by sending diffs rather
  93.      than entire files.  The client would need some way to keep the
  94.      version of the file which was originally checked out, which would
  95.      double client disk space requirements or require coordination with
  96.      editors (e.g. maybe it could use emacs numbered backups).  This
  97.      would also allow local operation of `cvs diff' without arguments.
  98.  
  99.    * Have the client keep a copy of some part of the repository.  This
  100.      allows all of `cvs diff' and large parts of `cvs update' and `cvs
  101.      ci' to be local.  The local copy could be made consistent with the
  102.      master copy at night (but if the master copy has been updated since
  103.      the latest nightly re-sync, then it would read what it needs to
  104.      from the master).
  105.  
  106.    * Provide encryption using kerberos.
  107.  
  108.    * The current procedure for `cvs update' is highly sub-optimal if
  109.      there are many modified files.  One possible alternative would be
  110.      to have the client send a first request without the contents of
  111.      every modified file, then have the server tell it what files it
  112.      needs.  Note the server needs to do the what-needs-to-be-updated
  113.      check twice (or more, if changes in the repository mean it has to
  114.      ask the client for more files), because it can't keep locks open
  115.      while waiting for the network.  Perhaps this whole thing is
  116.      irrelevant if client-side repositories are implemented, and the
  117.      rcsmerge is done by the client.
  118.  
  119. 
  120. File: cvsclient.info,  Node: Protocol,  Prev: Protocol Notes,  Up: Top
  121.  
  122. The CVS client/server protocol
  123. ******************************
  124.  
  125.    In the following, `\n' refers to a linefeed and `\t' refers to a
  126. horizontal tab.
  127.  
  128. * Menu:
  129.  
  130. * Entries Lines::
  131. * Modes::
  132. * Requests::
  133. * Responses::
  134. * Example::
  135.  
  136. 
  137. File: cvsclient.info,  Node: Entries Lines,  Next: Modes,  Up: Protocol
  138.  
  139. Entries Lines
  140. =============
  141.  
  142.    Entries lines are transmitted as:
  143.  
  144.      / NAME / VERSION / CONFLICT / OPTIONS / TAG_OR_DATE
  145.  
  146.    TAG_OR_DATE is either `T' TAG or `D' DATE or empty.  If it is
  147. followed by a slash, anything after the slash shall be silently ignored.
  148.  
  149.    VERSION can be empty, or start with `0' or `-', for no user file,
  150. new user file, or user file to be removed, respectively.
  151.  
  152.    CONFLICT, if it starts with `+', indicates that the file had
  153. conflicts in it.  The rest of CONFLICT is `=' if the timestamp matches
  154. the file, or anything else if it doesn't.  If CONFLICT does not start
  155. with a `+', it is silently ignored.
  156.  
  157. 
  158. File: cvsclient.info,  Node: Modes,  Next: Requests,  Prev: Entries Lines,  Up: Protocol
  159.  
  160. Modes
  161. =====
  162.  
  163.    A mode is any number of repetitions of
  164.  
  165.      MODE-TYPE = DATA
  166.  
  167.    separated by `,'.
  168.  
  169.    MODE-TYPE is an identifier composed of alphanumeric characters.
  170. Currently specified: `u' for user, `g' for group, `o' for other, as
  171. specified in POSIX.  If at all possible, give these their POSIX meaning
  172. and use other mode-types for other behaviors.  For example, on VMS it
  173. shouldn't be hard to make the groups behave like POSIX, but you would
  174. need to use ACLs for some cases.
  175.  
  176.    DATA consists of any data not containing `,', `\0' or `\n'.  For
  177. `u', `g', and `o' mode types, data consists of alphanumeric characters,
  178. where `r' means read, `w' means write, `x' means execute, and
  179. unrecognized letters are silently ignored.
  180.  
  181. 
  182. File: cvsclient.info,  Node: Requests,  Next: Responses,  Prev: Modes,  Up: Protocol
  183.  
  184. Requests
  185. ========
  186.  
  187.    File contents (noted below as FILE TRANSMISSION) can be sent in one
  188. of two forms.  The simpler form is a number of bytes, followed by a
  189. newline, followed by the specified number of bytes of file contents.
  190. These are the entire contents of the specified file.  Second, if both
  191. client and server support `gzip-file-contents', a `z' may precede the
  192. length, and the `file contents' sent are actually compressed with
  193. `gzip'.  The length specified is that of the compressed version of the
  194. file.
  195.  
  196.    In neither case are the file content followed by any additional data.
  197. The transmission of a file will end with a newline iff that file (or its
  198. compressed form) ends with a newline.
  199.  
  200. `Root PATHNAME \n'
  201.      Response expected: no.  Tell the server which `CVSROOT' to use.
  202.  
  203. `Valid-responses REQUEST-LIST \n'
  204.      Response expected: no.  Tell the server what responses the client
  205.      will accept.  request-list is a space separated list of tokens.
  206.  
  207. `valid-requests \n'
  208.      Response expected: yes.  Ask the server to send back a
  209.      `Valid-requests' response.
  210.  
  211. `Repository REPOSITORY \n'
  212.      Response expected: no.  Tell the server what repository to use.
  213.      This should be a directory name from a previous server response.
  214.      Note that this both gives a default for `Entry ' and `Modified '
  215.      and also for `ci' and the other commands; normal usage is to send a
  216.      `Repository ' for each directory in which there will be an `Entry
  217.      ' or `Modified ', and then a final `Repository ' for the original
  218.      directory, then the command.
  219.  
  220. `Directory LOCAL-DIRECTORY \n'
  221.      Additional data: REPOSITORY \n.  This is like `Repository', but
  222.      the local name of the directory may differ from the repository
  223.      name.  If the client uses this request, it affects the way the
  224.      server returns pathnames; see *Note Responses::.  LOCAL-DIRECTORY
  225.      is relative to the top level at which the command is occurring
  226.      (i.e. the last `Directory' or `Repository' which is sent before
  227.      the command).
  228.  
  229. `Max-dotdot LEVEL \n'
  230.      Tell the server that LEVEL levels of directories above the
  231.      directory which `Directory' requests are relative to will be
  232.      needed.  For example, if the client is planning to use a
  233.      `Directory' request for `../../foo', it must send a `Max-dotdot'
  234.      request with a LEVEL of at least 2.  `Max-dotdot' must be sent
  235.      before the first `Directory' request.
  236.  
  237. `Static-directory \n'
  238.      Response expected: no.  Tell the server that the directory most
  239.      recently specified with `Repository' or `Directory' should not have
  240.      additional files checked out unless explicitly requested.  The
  241.      client sends this if the `Entries.Static' flag is set, which is
  242.      controlled by the `Set-static-directory' and
  243.      `Clear-static-directory' responses.
  244.  
  245. `Sticky TAGSPEC \n'
  246.      Response expected: no.  Tell the server that the directory most
  247.      recently specified with `Repository' has a sticky tag or date
  248.      TAGSPEC.  The first character of TAGSPEC is `T' for a tag, or `D'
  249.      for a date.  The remainder of TAGSPEC contains the actual tag or
  250.      date.
  251.  
  252. `Checkin-prog PROGRAM \n'
  253.      Response expected: no.  Tell the server that the directory most
  254.      recently specified with `Directory' has a checkin program PROGRAM.
  255.      Such a program would have been previously set with the
  256.      `Set-checkin-prog' response.
  257.  
  258. `Update-prog PROGRAM \n'
  259.      Response expected: no.  Tell the server that the directory most
  260.      recently specified with `Directory' has an update program PROGRAM.
  261.      Such a program would have been previously set with the
  262.      `Set-update-prog' response.
  263.  
  264. `Entry ENTRY-LINE \n'
  265.      Response expected: no.  Tell the server what version of a file is
  266.      on the local machine.  The name in ENTRY-LINE is a name relative
  267.      to the directory most recently specified with `Repository'.  If
  268.      the user is operating on only some files in a directory, `Entry'
  269.      requests for only those files need be included.  If an `Entry'
  270.      request is sent without `Modified', `Unchanged', or `Lost' for that
  271.      file the meaning depends on whether `UseUnchanged' has been sent;
  272.      if it has been it means the file is lost, if not it means the file
  273.      is unchanged.
  274.  
  275. `Modified FILENAME \n'
  276.      Response expected: no.  Additional data: mode, \n, file
  277.      transmission.  Send the server a copy of one locally modified
  278.      file.  FILENAME is relative to the most recent repository sent
  279.      with `Repository'.  If the user is operating on only some files in
  280.      a directory, only those files need to be included.  This can also
  281.      be sent without `Entry', if there is no entry for the file.
  282.  
  283. `Lost FILENAME \n'
  284.      Response expected: no.  Tell the server that FILENAME no longer
  285.      exists.  The name is relative to the most recent repository sent
  286.      with `Repository'.  This is used for any case in which `Entry' is
  287.      being sent but the file no longer exists.  If the client has
  288.      issued the `UseUnchanged' request, then this request is not used.
  289.  
  290. `Unchanged FILENAME \n'
  291.      Response expected: no.  Tell the server that FILENAME has not been
  292.      modified in the checked out directory.  The name is relative to
  293.      the most recent repository sent with `Repository'.  This request
  294.      can only be issued if `UseUnchanged' has been sent.
  295.  
  296. `UseUnchanged \n'
  297.      Response expected: no.  Tell the server that the client will be
  298.      indicating unmodified files with `Unchanged', and that files for
  299.      which no information is sent are nonexistent on the client side,
  300.      not unchanged.  This is necessary for correct behavior since only
  301.      the server knows what possible files may exist, and thus what
  302.      files are nonexistent.
  303.  
  304. `Notify FILENAME \n'
  305.      Tell the server that a `edit' or `unedit' command has taken place.
  306.      The server needs to send a `Notified' response, but such response
  307.      is deferred until the next time that the server is sending
  308.      responses.  Response expected: no.  Additional data:
  309.           NOTIFICATION-TYPE \t TIME \t CLIENTHOST \t
  310.           WORKING-DIR \t WATCHES \n
  311.      where NOTIFICATION-TYPE is `E' for edit or `U' for unedit, TIME is
  312.      the time at which the edit or unedit took place, CLIENTHOST is the
  313.      name of the host on which the edit or unedit took place, and
  314.      WORKING-DIR is the pathname of the working directory where the
  315.      edit or unedit took place.  WATCHES are the temporary watches to
  316.      set; if it is followed by \t then the tab and the rest of the line
  317.      are ignored.
  318.  
  319. `Questionable FILENAME \n'
  320.      Response expected: no.  Additional data: no.  Tell the server to
  321.      check whether FILENAME should be ignored, and if not, next time the
  322.      server sends responses, send (in a `M' response) `?' followed by
  323.      the directory and filename.
  324.  
  325. `Argument TEXT \n'
  326.      Response expected: no.  Save argument for use in a subsequent
  327.      command.  Arguments accumulate until an argument-using command is
  328.      given, at which point they are forgotten.
  329.  
  330. `Argumentx TEXT \n'
  331.      Response expected: no.  Append \n followed by text to the current
  332.      argument being saved.
  333.  
  334. `Global_option OPTION \n'
  335.      Transmit one of the global options `-q', `-Q', `-l', `-t', `-r',
  336.      or `-n'.  OPTION must be one of those strings, no variations (such
  337.      as combining of options) are allowed.  For graceful handling of
  338.      `valid-requests', it is probably better to make new global options
  339.      separate requests, rather than trying to add them to this request.
  340.  
  341. `expand-modules \n'
  342.      Response expected: yes.  Expand the modules which are specified in
  343.      the arguments.  Returns the data in `Module-expansion' responses.
  344.      Note that the server can assume that this is checkout or export,
  345.      not rtag or rdiff; the latter do not access the working directory
  346.      and thus have no need to expand modules on the client side.
  347.  
  348. `co \n'
  349. `ci \n'
  350. `diff \n'
  351. `tag \n'
  352. `status \n'
  353. `log \n'
  354. `add \n'
  355. `remove \n'
  356. `rdiff \n'
  357. `rtag \n'
  358. `admin \n'
  359. `export \n'
  360. `history \n'
  361. `watchers \n'
  362. `editors \n'
  363.      Response expected: yes.  Actually do a cvs command.  This uses any
  364.      previous `Argument', `Repository', `Entry', `Modified', or `Lost'
  365.      requests, if they have been sent.  The last `Repository' sent
  366.      specifies the working directory at the time of the operation.  No
  367.      provision is made for any input from the user.  This means that
  368.      `ci' must use a `-m' argument if it wants to specify a log message.
  369.  
  370. `update \n'
  371.      Response expected: yes.  Actually do a `cvs update' command.  This
  372.      uses any previous `Argument', `Repository', `Entry', `Modified',
  373.      or `Lost' requests, if they have been sent.  The last `Repository'
  374.      sent specifies the working directory at the time of the operation.
  375.      The `-I' option is not used-files which the client can decide
  376.      whether to ignore are not mentioned and the client sends the
  377.      `Questionable' request for others.
  378.  
  379. `import \n'
  380.      Response expected: yes.  Actually do a `cvs import' command.  This
  381.      uses any previous `Argument', `Repository', `Entry', `Modified',
  382.      or `Lost' requests, if they have been sent.  The last `Repository'
  383.      sent specifies the working directory at the time of the operation.
  384.      The files to be imported are sent in `Modified' requests (files
  385.      which the client knows should be ignored are not sent; the server
  386.      must still process the CVSROOT/cvsignore file unless -I ! is
  387.      sent).  A log message must have been specified with a `-m'
  388.      argument.
  389.  
  390. `watch-on \n'
  391. `watch-off \n'
  392. `watch-add \n'
  393. `watch-remove \n'
  394.      Response expected: yes.  Actually do the `cvs watch on', `cvs
  395.      watch off', `cvs watch add', and `cvs watch remove' commands,
  396.      respectively.  This uses any previous `Argument', `Repository',
  397.      `Entry', `Modified', or `Lost' requests, if they have been sent.
  398.      The last `Repository' sent specifies the working directory at the
  399.      time of the operation.
  400.  
  401. `release \n'
  402.      Response expected: yes.  Note that a `cvs release' command has
  403.      taken place and update the history file accordingly.
  404.  
  405. `noop \n'
  406.      Response expected: yes.  This request is a null command in the
  407.      sense that it doesn't do anything, but merely (as with any other
  408.      requests expecting a response) sends back any responses pertaining
  409.      to pending errors, pending `Notified' responses, etc.
  410.  
  411. `update-patches \n'
  412.      This request does not actually do anything.  It is used as a
  413.      signal that the server is able to generate patches when given an
  414.      `update' request.  The client must issue the `-u' argument to
  415.      `update' in order to receive patches.
  416.  
  417. `gzip-file-contents LEVEL \n'
  418.      This request asks the server to filter files it sends to the client
  419.      through the `gzip' program, using the specified level of
  420.      compression.  If this request is not made, the server must not do
  421.      any compression.
  422.  
  423.      This is only a hint to the server.  It may still decide (for
  424.      example, in the case of very small files, or files that already
  425.      appear to be compressed) not to do the compression.  Compression
  426.      is indicated by a `z' preceding the file length.
  427.  
  428.      Availability of this request in the server indicates to the client
  429.      that it may compress files sent to the server, regardless of
  430.      whether the client actually uses this request.
  431.  
  432. `OTHER-REQUEST TEXT \n'
  433.      Response expected: yes.  Any unrecognized request expects a
  434.      response, and does not contain any additional data.  The response
  435.      will normally be something like `error  unrecognized request', but
  436.      it could be a different error if a previous command which doesn't
  437.      expect a response produced an error.
  438.  
  439.    When the client is done, it drops the connection.
  440.  
  441. 
  442. File: cvsclient.info,  Node: Responses,  Next: Example,  Prev: Requests,  Up: Protocol
  443.  
  444. Responses
  445. =========
  446.  
  447.    After a command which expects a response, the server sends however
  448. many of the following responses are appropriate.  Pathnames are of the
  449. actual files operated on (i.e. they do not contain `,v' endings), and
  450. are suitable for use in a subsequent `Repository' request.  However, if
  451. the client has used the `Directory' request, then it is instead a local
  452. directory name relative to the directory in which the command was given
  453. (i.e. the last `Directory' before the command).  Then a newline and a
  454. repository name (the pathname which is sent if `Directory' is not
  455. used).  Then the slash and the filename.  For example, for a file
  456. `i386.mh' which is in the local directory `gas.clean/config' and for
  457. which the repository is `/rel/cvsfiles/devo/gas/config':
  458.  
  459.      gas.clean/config/
  460.      /rel/cvsfiles/devo/gas/config/i386.mh
  461.  
  462.    Any response always ends with `error' or `ok'.  This indicates that
  463. the response is over.
  464.  
  465. `Valid-requests REQUEST-LIST \n'
  466.      Indicate what requests the server will accept.  REQUEST-LIST is a
  467.      space separated list of tokens.  If the server supports sending
  468.      patches, it will include `update-patches' in this list.  The
  469.      `update-patches' request does not actually do anything.
  470.  
  471. `Checked-in PATHNAME \n'
  472.      Additional data: New Entries line, \n.  This means a file PATHNAME
  473.      has been successfully operated on (checked in, added, etc.).  name
  474.      in the Entries line is the same as the last component of PATHNAME.
  475.  
  476. `New-entry PATHNAME \n'
  477.      Additional data: New Entries line, \n.  Like `Checked-in', but the
  478.      file is not up to date.
  479.  
  480. `Updated PATHNAME \n'
  481.      Additional data: New Entries line, \n, mode, \n, file
  482.      transmission.  A new copy of the file is enclosed.  This is used
  483.      for a new revision of an existing file, or for a new file, or for
  484.      any other case in which the local (client-side) copy of the file
  485.      needs to be updated, and after being updated it will be up to
  486.      date.  If any directory in pathname does not exist, create it.
  487.  
  488. `Merged PATHNAME \n'
  489.      This is just like `Updated' and takes the same additional data,
  490.      with the one difference that after the new copy of the file is
  491.      enclosed, it will still not be up to date.  Used for the results
  492.      of a merge, with or without conflicts.
  493.  
  494. `Patched PATHNAME \n'
  495.      This is just like `Updated' and takes the same additional data,
  496.      with the one difference that instead of sending a new copy of the
  497.      file, the server sends a patch produced by `diff -u'.  This client
  498.      must apply this patch, using the `patch' program, to the existing
  499.      file.  This will only be used when the client has an exact copy of
  500.      an earlier revision of a file.  This response is only used if the
  501.      `update' command is given the `-u' argument.
  502.  
  503. `Mode MODE \n'
  504.      This MODE applies to the next file mentioned in `Checked-in'.  It
  505.      does not apply to any request which follows a `Checked-in',
  506.      `New-entry', `Updated', `Merged', or `Patched' response.
  507.  
  508. `Checksum CHECKSUM\n'
  509.      The CHECKSUM applies to the next file sent over via `Updated',
  510.      `Merged', or `Patched'.  In the case of `Patched', the checksum
  511.      applies to the file after being patched, not to the patch itself.
  512.      The client should compute the checksum itself, after receiving the
  513.      file or patch, and signal an error if the checksums do not match.
  514.      The checksum is the 128 bit MD5 checksum represented as 32 hex
  515.      digits.  This response is optional, and is only used if the client
  516.      supports it (as judged by the `Valid-responses' request).
  517.  
  518. `Copy-file PATHNAME \n'
  519.      Additional data: NEWNAME \n.  Copy file PATHNAME to NEWNAME in the
  520.      same directory where it already is.  This does not affect
  521.      `CVS/Entries'.
  522.  
  523. `Removed PATHNAME \n'
  524.      The file has been removed from the repository (this is the case
  525.      where cvs prints `file foobar.c is no longer pertinent').
  526.  
  527. `Remove-entry PATHNAME \n'
  528.      The file needs its entry removed from `CVS/Entries', but the file
  529.      itself is already gone (this happens in response to a `ci' request
  530.      which involves committing the removal of a file).
  531.  
  532. `Set-static-directory PATHNAME \n'
  533.      This instructs the client to set the `Entries.Static' flag, which
  534.      it should then send back to the server in a `Static-directory'
  535.      request whenever the directory is operated on.  PATHNAME ends in a
  536.      slash; its purpose is to specify a directory, not a file within a
  537.      directory.
  538.  
  539. `Clear-static-directory PATHNAME \n'
  540.      Like `Set-static-directory', but clear, not set, the flag.
  541.  
  542. `Set-sticky PATHNAME \n'
  543.      Additional data: TAGSPEC \n.  Tell the client to set a sticky tag
  544.      or date, which should be supplied with the `Sticky' request for
  545.      future operations.  PATHNAME ends in a slash; its purpose is to
  546.      specify a directory, not a file within a directory.  The first
  547.      character of TAGSPEC is `T' for a tag, or `D' for a date.  The
  548.      remainder of TAGSPEC contains the actual tag or date.
  549.  
  550. `Clear-sticky PATHNAME \n'
  551.      Clear any sticky tag or date set by `Set-sticky'.
  552.  
  553. `Set-checkin-prog DIR \n'
  554.      Additional data: PROG \n.  Tell the client to set a checkin
  555.      program, which should be supplied with the `Checkin-prog' request
  556.      for future operations.
  557.  
  558. `Set-update-prog DIR \n'
  559.      Additional data: PROG \n.  Tell the client to set an update
  560.      program, which should be supplied with the `Update-prog' request
  561.      for future operations.
  562.  
  563. `Notified PATHNAME \n'
  564.      Indicate to the client that the notification for PATHNAME has been
  565.      done.  There should be one such response for every `Notify'
  566.      request; if there are several `Notify' requests for a single file,
  567.      the requests should be processed in order; the first `Notified'
  568.      response pertains to the first `Notify' request, etc.
  569.  
  570. `Module-expansion PATHNAME \n Return a file or directory'
  571.      which is included in a particular module.  PATHNAME is relative to
  572.      cvsroot, unlike most pathnames in responses.  PATHNAME should be
  573.      used to look and see whether some or all of the module exists on
  574.      the client side; it is not necessarily suitable for passing as an
  575.      argument to a `co' request (for example, if the modules file
  576.      contains the `-d' option, it will be the directory specified with
  577.      `-d', not the name of the module).
  578.  
  579. `M TEXT \n'
  580.      A one-line message for the user.
  581.  
  582. `E TEXT \n'
  583.      Same as `M' but send to stderr not stdout.
  584.  
  585. `error ERRNO-CODE ` ' TEXT \n'
  586.      The command completed with an error.  ERRNO-CODE is a symbolic
  587.      error code (e.g. `ENOENT'); if the server doesn't support this
  588.      feature, or if it's not appropriate for this particular message,
  589.      it just omits the errno-code (in that case there are two spaces
  590.      after `error').  Text is an error message such as that provided by
  591.      strerror(), or any other message the server wants to use.
  592.  
  593. `ok \n'
  594.      The command completed successfully.
  595.  
  596. 
  597. File: cvsclient.info,  Node: Example,  Prev: Responses,  Up: Protocol
  598.  
  599. Example
  600. =======
  601.  
  602.    Lines beginning with `c>' are sent by the client; lines beginning
  603. with `s>' are sent by the server; lines beginning with `#' are not part
  604. of the actual exchange.
  605.  
  606.      c> Root /rel/cvsfiles
  607.      # In actual practice the lists of valid responses and requests would
  608.      # be longer
  609.      c> Valid-responses Updated Checked-in M ok error
  610.      c> valid-requests
  611.      s> Valid-requests Root co Modified Entry Repository ci Argument Argumentx
  612.      s> ok
  613.      # cvs co devo/foo
  614.      c> Argument devo/foo
  615.      c> co
  616.      s> Updated /rel/cvsfiles/devo/foo/foo.c
  617.      s> /foo.c/1.4/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993//
  618.      s> 26
  619.      s> int mein () { abort (); }
  620.      s> Updated /rel/cvsfiles/devo/foo/Makefile
  621.      s> /Makefile/1.2/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993//
  622.      s> 28
  623.      s> foo: foo.c
  624.      s>         $(CC) -o foo $<
  625.      s> ok
  626.      # In actual practice the next part would be a separate connection.
  627.      # Here it is shown as part of the same one.
  628.      c> Repository /rel/cvsfiles/devo/foo
  629.      # foo.c relative to devo/foo just set as Repository.
  630.      c> Entry /foo.c/1.4/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993//
  631.      c> Entry /Makefile/1.2/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993//
  632.      c> Modified foo.c
  633.      c> 26
  634.      c> int main () { abort (); }
  635.      # cvs ci -m <log message> foo.c
  636.      c> Argument -m
  637.      c> Argument Well, you see, it took me hours and hours to find this typo and I
  638.      c> Argumentx searched and searched and eventually had to ask John for help.
  639.      c> Argument foo.c
  640.      c> ci
  641.      s> Checked-in /rel/cvsfiles/devo/foo/foo.c
  642.      s> /foo.c/1.5/ Mon Apr 19 15:54:22 CDT 1993//
  643.      s> M Checking in foo.c;
  644.      s> M /cygint/rel/cvsfiles/devo/foo/foo.c,v  <--  foo.c
  645.      s> M new revision: 1.5; previous revision: 1.4
  646.      s> M done
  647.      s> ok
  648.  
  649.  
  650. 
  651. Tag Table:
  652. Node: Top99
  653. Node: Goals645
  654. Node: Notes2142
  655. Node: Protocol Notes3386
  656. Node: Protocol5068
  657. Node: Entries Lines5367
  658. Node: Modes6075
  659. Node: Requests6895
  660. Node: Responses18751
  661. Node: Example25813
  662. 
  663. End Tag Table
  664.